<extend name="CigoAdminLib@Common/pageContent"/>

<block name="tool-bar-btns">
	<a class="btn btn-warning" href="#" onclick="history.go(-1);">
		<i class="fa fa-reply"></i>
		取消修改
	</a>
	<a class="btn btn-success" formId="form" href="<<{:U('')}>>">
		<i class="fa fa-check"></i>
		保存修改
	</a>
</block>

<block name="content">
	<form id="form">
		<div class="form-group">
			<div class="cigo-edit item-input" cigo-edit-label="当前昵称" cigo-edit-type="text"
			     cigo-edit-class="form-control" cigo-edit-style="width:260px;"
			     cigo-edit-value="<<{$nickName}>>" cigo-edit-readonly="readonly"></div>
		</div>

		<div class="form-group">
			<div class="cigo-edit item-input" cigo-edit-label="新昵称" cigo-edit-type="text"
			     cigo-edit-class="form-control" cigo-edit-style="width:260px;"
			     cigo-edit-name="nickname" cigo-edit-placeholder="请输入新昵称..."></div>
		</div>

		<div class="form-group">
			<div class="cigo-edit item-input" cigo-edit-label="用户密码" cigo-edit-type="password"
			     cigo-edit-class="form-control" cigo-edit-style="width:260px;"
			     cigo-edit-name="password" cigo-edit-placeholder="请输入用户密码..."></div>
		</div>
		<div class="form-group btn-group">
			<a class="btn btn-success btn-default" href="<<{:U('')}>>" formId="form">
				保存修改
			</a>
			<a class="btn btn-warning btn-default" href="#" onclick="history.go(-1);">取&nbsp;&nbsp;消</a>
		</div>
	</form>
</block>

<block name="js-footer">
	<script type="text/javascript">
		$(".btn-success").click(function (evt) {
			formPost(evt, $(this), function (data) {
				cigoLayer.msg(data.info, {icon: 6});
				setTimeout(function () {
					parent.location.href = data.url;
				}, 1500);
			}, function (data) {
				cigoLayer.msg(data.info, {icon: 5});
			});

			return false;
		});
	</script>
</block>
